Salesforce Data Cloud Ingestion from Confluence - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
| Module | Description |
|---|---|
| confluence-app-capabilities | Provides the capabilities of the ingestion application for Confluence. |
| map-full-refresh-response | Provides the content metadata details of resources maintained in the source system. |
| changeEventsTools | Helpers for generating the input request to the Data Cloud Ingestion API with the provided event metadata. |
confluence-app-capabilities
Provides the capabilities of the ingestion application for Confluence.
Source:
./src/main/resources/dwl/confluence-app-capabilities.dwl
Mapping Tables
Provides the capabilities of the ingestion application for Confluence.
| Source Field Name | Confluence Field Name | Mapping Description |
|---|---|---|
| sourceId | NA | Confluence Space ID from configuration file |
| sourceType | NA | Source system name from configuration file |
| sourceName | results.name | Confluence Space name |
| description | NA | Monitor Confluence for change events |
| isEventDriven | NA | Default value true |
| isHierarchical | NA | Default value false |
| supportedChangeModes | NA | Supports Notification and PollFullRefresh |
| supportedChangeEvents | NA | Supported types of events |
| supportedPaginationMode | NA | Supports the ContinuationToken pagination mode |
map-full-refresh-response
Provides the content metadata details of resources maintained in the source system.
Source:
./src/main/resources/dwl/map-full-refresh-response.dwl
Mapping Tables
Maps the content metadata details of resources maintained in the source system.
| Source Field Name | Confluence Field Name | Mapping Description |
|---|---|---|
| continuationToken | '_links'.next | Token for next list of changes |
| resourceChanges.applicationId | NA | API AutoDiscoveryID from configuration file |
| resourceChanges.sourceId | results.space.id | ID of the Confluence space being monitored |
| resourceChanges.sourceType | NA | Source system name |
| resourceChanges.changeEventType | NA | Type of event |
| resourceChanges.eventDateTime | NA | Current Timestamp |
| resourceChanges.resourceEntry.resourceId | results.id | Resource ID |
| resourceChanges.resourceEntry.resourceName | results.title | Resource name |
| resourceChanges.resourceEntry.resourceType | NA | Type of resource page or blogpost |
| resourceChanges.resourceEntry.resourceLocation | results.'_links'.self | Resource location |
| resourceChanges.resourceEntry.resourcePath | results.'_links'.webui | Relative path of resource |
| resourceChanges.resourceEntry.contentType | NA | Resource content type |
| resourceChanges.resourceEntry.contentVersion | history.createdDate.'_expandable'.version | Resource version |
| resourceChanges.resourceEntry.authorName | history.createdBy.publicName | Author name |
| resourceChanges.resourceEntry.authorId | history.createdBy.accountId | Author account ID |
| resourceChanges.resourceEntry.createdDate | results.history.createdDate or results.history.'_expandable'.lastUpdated | Resource creation date |
| resourceChanges.resourceEntry.createdBy | results.history.createdBy.accountId | Resource owner ID |
| resourceChanges.resourceEntry.updatedDate | results.history.'_expandable'.lastUpdated or history.createdDate | Resource modification date |
| resourceChanges.resourceEntry.updatedBy | results.authorId | Resource author ID |
| resourceChanges.resourceEntry.isArchived | NA | Resource state as default false |
| resourceChanges.resourceEntry.isDeleted | NA | Resource state as default false |
changeEventsTools
Helpers for generating the input request to the Data Cloud Ingestion API with the provided event metadata.
Source:
./src/main/resources/dwl/changeEventsTools.dwl
Functions
fun ingestionAPIRequest (eventData, eventDateTime, resourceType, resourceState, spaceId, sourceType, contentType, appId)
Maps the input request to the Ingestion API with the provided event metadata.
param
eventDatais the resource event metadata
parameventDateTimeis the timstamp received from the source
paramresourceTypeis the type of resource, like page or blogpost
paramresourceStateis the state of the resource such asDeletedorActive
paramspaceIdis the identifier of the Confluence space being monitored
paramsourceTypeis the actual source of data (Confluence)
paramcontentTypeis the content type
paramappIdis the autodiscovery ID from configuration property file
return input request to Ingestion API as an array
| Source Field Name | Confluence Field Name | Mapping Description |
|---|---|---|
| applicationId | NA | API autodiscovery ID from configuration file |
| sourceId | NA | SDC monitoring Confluence Space ID |
| sourceType | NA | Source system name |
| changeEventType | NA | Type of event |
| eventDateTime | timestamp | Event occurrence time |
| resourceEntry.resourceId | id | Event notification ID |
| resourceEntry.resourceName | title | Title of the resource |
| resourceEntry.resourceType | NA | Type of resource page or blogpost |
| resourceEntry.resourceLocation | self | Resource location |
| resourceEntry.resourcePath | self.path | Resource relative path |
| resourceEntry.contentType | NA | Content type |
| resourceEntry.contentVersion | version | Version of content |
| resourceEntry.authorId | lastModifierAccountId | Author account ID |
| resourceEntry.createdDate | creationDate or modificationDate | Event creation date |
| resourceEntry.updatedDate | modificationDate or creationDate | Event modification date |
| resourceEntry.isArchived | NA | True if resource state is Archived |
| resourceEntry.isDeleted | NA | True if resource state is Deleted |
fun convertTimestampToDateTime (timestamp)
Converts the provided timestamp to datetime.
param
timestampis the timestamp received from the source system
return human-readable datetime
fun mapChangeEventType (event)
Converts the provided Confluence event to an application supported event type.
param
eventis the actual event triggered from Confluence
return Application supported common event type